﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Utility;


namespace HRM.DLL
{
    public class Menu
    {
        public DataTable GetAllMenus()
        {
            SqlHelper objSqlHelper = new SqlHelper();

            IDataReader dr = objSqlHelper.ExecuteReader("prMenus_Extract");
            DataTable dt=new DataTable();
            dt.Load(dr);
            objSqlHelper.Dispose();
            return dt;
        }

        public string GetBreadCrumb(int MenuID)
        {
            SqlHelper objSqlHelper = new SqlHelper();

            objSqlHelper.AddParameter("@ID", MenuID);
            IDataReader dr = objSqlHelper.ExecuteReader("prGetBreadCrumb");
            DataTable dt = new DataTable();
            dt.Load(dr);
            objSqlHelper.Dispose();

            return dt.Rows[0][0].ToString();
        }
        
    }
}
